﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="firmarPDF.index" %>


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Firmar PDF</title>
    <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css">
    <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap-theme.min.css">
    <script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script>
    <script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
    <style type="text/css">
        .bs-example {
            margin: 60px;
        }
    </style>
    <script type="text/javascript">

        function mostrarFirmasUsuario() {
            $("#firmasUsuario").show();
            $("#firmasServidor").hide();
            $("#home").hide();
            $("#uploadPDF").hide();

        }

        function mostrarFirmasServidor() {
            $("#firmasUsuario").hide();
            $("#firmasServidor").show();
            $("#home").hide();
            $("#uploadPDF").hide();
        }

        function mostrarUploadPDF() {
            $("#uploadPDF").show();
            $("#firmasUsuario").hide();
            $("#firmasServidor").hide();
            $("#home").hide();
        }

        function mostrarHome() {
            $("#firmasUsuario").hide();
            $("#firmasServidor").hide();
            $("#home").show();
            $("#uploadPDF").hide();

        }
    </script>
</head>
<body>
    <nav id="myNavbar" class="navbar navbar-default navbar-inverse navbar-fixed-top" role="navigation">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbarCollapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#" onclick="mostrarHome()">Firmar PDF</a>
            </div>
            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="navbarCollapse">
                <ul class="nav navbar-nav">
                    <li class="active"><a href="#" onclick="mostrarHome()">Home</a></li>
                    <li><a href="#" target="_blank">About</a></li>
                    <li><a href="#" target="_blank">Contact</a></li>
                </ul>
            </div>
        </div>
    </nav>
    <div class="container">
        <div class="bs-example">
            <ul class="nav nav-pills">
                <li class="active"><a href="#" onclick="mostrarHome()">Home</a></li>
                <li><a href="#" onclick="mostrarFirmasUsuario()">Firmas usuario</a></li>
                <li><a href="#" onclick="mostrarFirmasServidor()">Firmas Servidor</a></li>
                <li><a href="#" onclick="mostrarUploadPDF()">Upload PDF</a></li>
            </ul>
        </div>

        <!-- HOME -->
        <div id="home">
            <div class="jumbotron">
                <h1>Firmar PDF</h1>
                <p>"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."</p>
                <p><a href="#" target="_blank" class="btn btn-success btn-lg">Boton</a></p>
            </div>
        </div>

        <form id="form1" runat="server">

            <!-- UPLOAD PDF -->
            <div id="uploadPDF" hidden>
                <asp:FileUpload ID="FileUploadControl" runat="server" />
                <asp:Button runat="server" ID="UploadButton" Text="Upload" OnClick="UploadButton_Click" />
                <br />
                <br />
                <asp:Label runat="server" ID="StatusLabel" Text="Upload status: " />
                <iframe runat="server" id="iframepdf" height="600" width="800"  >  </iframe>

            </div>

            <!-- FIRMAS USUARIO -->
            <div id="firmasUsuario" hidden>
                <br />
                <br />
                <asp:DropDownList ID="listaCertificadosUsuario" CssClass="selectpicker" runat="server"></asp:DropDownList>
                <asp:Label ID="label1" runat="server" />
            </div>

            <!-- FIRMAS SERVIDOR -->
            <div id="firmasServidor" hidden>
                <br />
                <br />
                <asp:DropDownList ID="listaCertificadosServidor" CssClass="selectpicker" runat="server"></asp:DropDownList>
                <asp:Label ID="label2" runat="server" />
            </div>
        </form>
    </div>

</body>
</html>
